<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		.box01,.box02,.box03,.box04{
			width: 200px;
			height: 200px;
			border:3px solid #000;
			background-color: gold;
			margin: 30px;
			float: left;
			transition: all 1s ease;
		}
		.box02{
			transform-origin: left top;
		}
		.box01:hover,.box02:hover,.box03:hover,.box04:hover{
			transform: rotate(45deg);
		}
	</style>
</head>
<body>
	<div class="box01"></div>
	<div class="box02"></div>
	<div class="box03"></div>
	<div class="box04"></div>
</body>
</html>